1. Technical Field of the Invention
This invention pertains to the formatting of documents. More particularly, it relates to the generation of output documents having nonfunctional aspects presented in the style of a user supplied example.
2. Background Art
There are many tools that generate documents. These tools are useful because they automate tasks that would otherwise be time-consuming and menial for a user. Examples of these tools are conversion utilities (where one document form is transformed into another), source code generators or any other program that has as its output some kind of text document. If the task is well-defined then these programs are very effective in providing a desired result at the functional level.
The problem is that there is often some aspect of the task that can't be defined in a procedural kind of way. For example, if a user uses a code generation tool, a syntactically and semantically correct piece of source code may result as output, but that output may not have the desired style. Style, in this case, refers to such things as how lines are indented, the order in which to put certain sections of a document, whether and how to put comments before certain lines, and so forth. There is no one “correct” style for most documents so there can be no deterministic way to generate the perfect document for all users. Users have their own preferences for these nonfunctional output conditions. Despite the fact that these things are nonfunctional, users tend to be very committed to them. Consequently, such style preferences result in users choosing not to use the tools which do not accommodate their preference.
It would thus be advantageous to provide an improved system and method for formatting output documents, particularly for formatting output documents in a style preferred by a user.
It would also be advantageous to provide a system and method enabling a user to specify by example the style of an output document, particularly specifying by example the nonfunctional aspects, including text element position, annotations, alignment offsets, and document section order, to be applied to the functional aspects of an output document.